<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class GanadoTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		
		Schema::create('ganados',function($table){
            $table->increments('id');
			$table->string('cod_ganado',50);
			$table->boolean('sexo');
			$table->string('color',50);
			$table->integer('id_raza');
			$table->integer('id_tipo');
			$table->string('fecha_nacimiento',10);
			$table->integer('cod_madre');
			$table->integer('cod_padre');
			$table->integer('estado');
			$table->boolean('activo');
			$table->string('descripcion',250);
			$table->timestamps();
        });
		Schema::create('tipos_ganados',function($table){
			$table->increments('id');
			$table->string('tipo',50);
			$table->string('descripcion');
			$table->boolean('activo');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('ganados');
		Schema::drop('tipos_ganados');
	}

}
